package com.sn.author.controller;

import com.sn.author.domain.BaseResult;
import com.sn.author.domain.vo.TaskVo;
import com.sn.author.service.dao.TaskService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * @Author xiaom
 * @Date 2020/9/25 16:34
 * @Version 1.0.0
 * @Description <>
 **/
@RestController
@RequestMapping(value = "/test")
@Api(tags = "测试中心")
public class TestController {

    @Autowired
    private TaskService taskService;

    @GetMapping("testStartAttention")
    public BaseResult testStartAttention(){
        TaskVo vo = new TaskVo();
        vo.setAccounts(Arrays.asList("17077573183","17077571120"));
        vo.setVideoUrl(Arrays.asList("www.baidu.com","www.google.com","www.jd.com"));
        vo.setAinterval(1);
        vo.setCinterval(2);
        vo.setCount(10);
        vo.setLimitFlag(0);
        vo.setType(20);
        taskService.start(vo);
        return BaseResult.success(null);
    }

}
